package com.jiazhong.mingxing.project.bookstore.front.config;

import com.alipay.api.AlipayClient;
import com.jiazhong.mingxing.project.bookstore.front.interceptor.IsLoginInterceptor;
import jakarta.annotation.Resource;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class SpringMVCConfig implements WebMvcConfigurer {
    @Resource
    private IsLoginInterceptor isLoginInterceptor;

    public static AlipayClient alipayClient;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(isLoginInterceptor).addPathPatterns("/shopping_cart/**", "/address/**");
    }
}
